const { View , Text , Button} = require("@tarojs/components");
import './AllReport.less'
import http from '../../../../utils/http'
import Taro,{useReady} from '@tarojs/taro'
import React, { useState} from 'react'

function AllReport () {
    const [id,setId]=useState('')
    const [arr,setArr]=useState([])

    useReady(() => {
		setId(Taro.getCurrentInstance().router.params.id)
        http({   //获取我的体检详细
            url:"/getlookreport",
            data:{
                order_orderId:Taro.getCurrentInstance().router.params.id
            },
            header:{
                'content-type': 'application/json' 
            },
        }).then((res)=>{
            setArr(res[0])
        })
      })

    return(
        <View className="body">
            <View className="view1">
                <View>一般项目检查</View>
                <View><Text>收缩压</Text><Text>{arr.SBP}</Text></View>
                <View><Text>舒张压</Text><Text>{arr.DBP}</Text></View>
                <View><Text>脉搏</Text><Text>{arr.pulse}</Text></View>
                <View><Text>初步意见</Text><Text>{arr.conclusion}</Text></View>
            </View>
            <View className="view1">
                <View>血常规</View>
                <View><Text>白细胞</Text><Text>{arr.hemameba}</Text></View>
                <View><Text>红细胞</Text><Text>{arr.red_blood}</Text></View>
                <View><Text>血红蛋白</Text><Text>{arr.hemoglobin}</Text></View>
                <View><Text>红细胞积压</Text><Text>{arr.HCT}</Text></View>
                <View><Text>血小板</Text><Text>{arr.BP}</Text></View>
                <View><Text>初步意见</Text><Text>{arr.opinionFirst}</Text></View>
            </View>
            <View class="view1">
                <View>肝功能三项</View>
                <View><Text>丙氨酸氨基转氨酶</Text><Text>{arr.ALT}</Text></View>
                <View><Text>AST/ALT</Text><Text>{arr.AST}</Text></View>
                <View><Text>r-谷氨酰转移酶</Text><Text>{arr.GGT}</Text></View>
                <View><Text>初步意见</Text><Text>{arr.opinionSecond}</Text></View>
            </View>
        </View>
    )
}
export default AllReport